<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditClienteTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditClienteLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{clienteController.selected.nombre}" title="#{bundle.EditClienteTitle_nombre}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_nombre}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_apellido}" for="apellido" />
                    <h:inputText id="apellido" value="#{clienteController.selected.apellido}" title="#{bundle.EditClienteTitle_apellido}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_apellido}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_telefono}" for="telefono" />
                    <h:inputText id="telefono" value="#{clienteController.selected.telefono}" title="#{bundle.EditClienteTitle_telefono}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_telefono}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_nroDoc}" for="nroDoc" />
                    <h:inputText id="nroDoc" value="#{clienteController.selected.nroDoc}" title="#{bundle.EditClienteTitle_nroDoc}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_nroDoc}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_direccion}" for="direccion" />
                    <h:inputText id="direccion" value="#{clienteController.selected.direccion}" title="#{bundle.EditClienteTitle_direccion}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_direccion}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_email}" for="email" />
                    <h:inputText id="email" value="#{clienteController.selected.email}" title="#{bundle.EditClienteTitle_email}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_email}"/>
                </h:panelGrid>
                <h:commandLink action="#{clienteController.update}" value="#{bundle.EditClienteSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditClienteViewLink}"/>
                <br />
                <h:commandLink action="#{clienteController.prepareList}" value="#{bundle.EditClienteShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditClienteIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
